package sv.gob.mh.dgii.model;

// Generated Dec 12, 2007 3:08:52 PM by Hibernate Tools 3.2.0.CR1

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * TbDomicilio generated by hbm2java
 */
@Entity
@Table(name = "TB_DOMICILIO", schema = "CATALOGOS")
public class TbDomicilio implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String cdomicilio;
	private String ddomicilio;
	private Date fhingreso;
	private Integer bstatus;
	private Integer bdetalle;
	private String sdetalle;
	private Integer bdeclaracion;
	private String cusuario;
	private Integer bregMultiple;
	private Set<RcDomicilio> rcDomicilios = new HashSet<RcDomicilio>(0);

	public TbDomicilio() {
	}

	public TbDomicilio(String cdomicilio, String ddomicilio, Date fhingreso,
			Integer bstatus, Integer bdetalle, Integer bdeclaracion,
			String cusuario, Integer bregMultiple) {
		this.cdomicilio = cdomicilio;
		this.ddomicilio = ddomicilio;
		this.fhingreso = fhingreso;
		this.bstatus = bstatus;
		this.bdetalle = bdetalle;
		this.bdeclaracion = bdeclaracion;
		this.cusuario = cusuario;
		this.bregMultiple = bregMultiple;
	}

	public TbDomicilio(String cdomicilio, String ddomicilio, Date fhingreso,
			Integer bstatus, Integer bdetalle, String sdetalle,
			Integer bdeclaracion, String cusuario, Integer bregMultiple,
			Set<RcDomicilio> rcDomicilios) {
		this.cdomicilio = cdomicilio;
		this.ddomicilio = ddomicilio;
		this.fhingreso = fhingreso;
		this.bstatus = bstatus;
		this.bdetalle = bdetalle;
		this.sdetalle = sdetalle;
		this.bdeclaracion = bdeclaracion;
		this.cusuario = cusuario;
		this.bregMultiple = bregMultiple;
		this.rcDomicilios = rcDomicilios;
	}

	@Id
	@Column(name = "C_DOMICILIO", unique = true, nullable = false, length = 2)
	public String getCdomicilio() {
		return this.cdomicilio;
	}

	public void setCdomicilio(String cdomicilio) {
		this.cdomicilio = cdomicilio;
	}

	@Column(name = "D_DOMICILIO", nullable = false, length = 40)
	public String getDdomicilio() {
		return this.ddomicilio;
	}

	public void setDdomicilio(String ddomicilio) {
		this.ddomicilio = ddomicilio;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FH_INGRESO", nullable = false, length = 7)
	public Date getFhingreso() {
		return this.fhingreso;
	}

	public void setFhingreso(Date fhingreso) {
		this.fhingreso = fhingreso;
	}

	@Column(name = "B_STATUS", nullable = false, precision = 1, scale = 0)
	public Integer getBstatus() {
		return this.bstatus;
	}

	public void setBstatus(Integer bstatus) {
		this.bstatus = bstatus;
	}

	@Column(name = "B_DETALLE", nullable = false, precision = 1, scale = 0)
	public Integer getBdetalle() {
		return this.bdetalle;
	}

	public void setBdetalle(Integer bdetalle) {
		this.bdetalle = bdetalle;
	}

	@Column(name = "S_DETALLE", length = 40)
	public String getSdetalle() {
		return this.sdetalle;
	}

	public void setSdetalle(String sdetalle) {
		this.sdetalle = sdetalle;
	}

	@Column(name = "B_DECLARACION", nullable = false, precision = 1, scale = 0)
	public Integer getBdeclaracion() {
		return this.bdeclaracion;
	}

	public void setBdeclaracion(Integer bdeclaracion) {
		this.bdeclaracion = bdeclaracion;
	}

	@Column(name = "C_USUARIO", nullable = false, length = 30)
	public String getCusuario() {
		return this.cusuario;
	}

	public void setCusuario(String cusuario) {
		this.cusuario = cusuario;
	}

	@Column(name = "B_REG_MULTIPLE", nullable = false, precision = 1, scale = 0)
	public Integer getBregMultiple() {
		return this.bregMultiple;
	}

	public void setBregMultiple(Integer bregMultiple) {
		this.bregMultiple = bregMultiple;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbDomicilio")
	public Set<RcDomicilio> getRcDomicilios() {
		return this.rcDomicilios;
	}

	public void setRcDomicilios(Set<RcDomicilio> rcDomicilios) {
		this.rcDomicilios = rcDomicilios;
	}

}
